Package | who.ddcc |
Type | StructureMap |
Id | Id |
FHIR Version | R4 |
Source | http://smart.who.int/ddcc/https://build.fhir.org/ig/WorldHealthOrganization/ddcc/StructureMap-QRespToVSCoreDataSet.html |
Url | http://smart.who.int/ddcc/StructureMap/QRespToVSCoreDataSet |
Version | 1.0.0 |
Status | draft |
Date | 2024-10-17T05:03:04+00:00 |
Name | QRespToVSCoreDataSet |
Experimental | False |
Realm | uv |
Authority | who |
No resources found
No resources found
Note: links and images are rebased to the (stated) source
Generated Narrative: StructureMap QRespToVSCoreDataSet
map "http://smart.who.int/ddcc/StructureMap/QRespToVSCoreDataSet" = "QRespToVSCoreDataSet" uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source uses "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSCoC" alias DDCC as target group QRespToCoreDataSet(source qr : QResp, target ddcc : DDCC) { qr as src then QRespToHeader(src, ddcc) "set header content"; qr as src -> ddcc.vaccination as vaccination then QRespToVaccination(src, vaccination) "set vaccination content"; qr as src -> ddcc.certificate as certificate then QRespToCertificate(src, certificate) "set certificate content"; } group QRespToHeader(source qr, target ddcc) { qr.item as item then { item.answer first as answer where item.linkId = 'name' then { answer.valueString as content -> ddcc.name = content "set name"; } "first answser for name"; item.answer first as answer where item.linkId = 'birthDate' then { answer.valueDate as content -> ddcc.birthDate = content "set birthDate"; } "first answer for birthDate"; item.answer first as answer where item.linkId = 'identifier' -> ddcc.identifier as identifier then { answer.valueString as content -> identifier.value = content "set identifier"; } "first answer for identifier"; item.answer first as answer where item.linkId = 'sex' then { answer.valueCoding as coding then { coding.code as content -> ddcc.sex = content "set sex"; } "process coding"; } "first answer for sex"; } "header items"; } group QRespToVaccination(source qr, target vaccination) { qr.item as item then { item.answer first as answer where item.linkId = 'vaccine' then { answer.valueCoding as content -> vaccination.vaccine = content "set vaccine"; } "first answer for vaccine"; item.answer first as answer where item.linkId = 'brand' then { answer.valueCoding as content -> vaccination.brand = content "set brand"; } "first answer for brand"; item.answer first as answer where item.linkId = 'manufacturer' then { answer.valueCoding as content -> vaccination.manufacturer = content "set manufacturer"; } "first answer for manufacturer"; item.answer first as answer where item.linkId = 'ma_holder' then { answer.valueCoding as content -> vaccination.maholder = content "set maholder"; } "first answer for maholder"; item.answer first as answer where item.linkId = 'lot' then { answer.valueString as content -> vaccination.lot = content "set lot"; } "first answser for lot"; item.answer first as answer where item.linkId = 'date' then { answer.valueDate as content -> vaccination.date = content "set date"; } "first answer for date"; item.answer first as answer where item.linkId = 'vaccine_valid' then { answer.valueDate as content -> vaccination.validFrom = content "set validFrom"; } "first answer for validFrom"; item.answer first as answer where item.linkId = 'dose' then { answer.valueInteger as content -> vaccination.dose = content "set dose"; } "first answer for dose"; item.answer first as answer where item.linkId = 'total_doses' then { answer.valueInteger as content -> vaccination.totalDoses = content "set totalDoses"; } "first answer for totalDoses"; item.answer first as answer where item.linkId = 'country' then { answer.valueCoding as content -> vaccination.country = content "set country"; } "first answer for country"; item.answer first as answer where item.linkId = 'centre' then { answer.valueString as content -> vaccination.centre = content "set centre"; } "first answser for centre"; item.answer first as answer where item.linkId = 'hw' -> vaccination.practitioner as identifier then { answer.valueString as content -> identifier.value = content "set practitioner"; } "first answser for practitioner"; item.answer first as answer where item.linkId = 'disease' then { answer.valueCoding as content -> vaccination.disease = content "set disease"; } "first answer for disease"; item.answer first as answer where item.linkId = 'due_date' then { answer.valueDate as content -> vaccination.nextDose = content "set nextDose"; } "first answer for nextDose"; } "vaccination items"; } group QRespToPeriod(source qr, target period) { qr.item as item then { item.answer first as answer where item.linkId = 'valid_from' then { answer.valueDate as content -> period.start = content "set valid_from"; } "first answer for valid_from"; item.answer first as answer where item.linkId = 'valid_until' then { answer.valueDate as content -> period.end = content "set valid_until"; } "first answer for valid_until"; } "vaccination validity items"; } group QRespToCertificate(source qr, target certificate) { qr.item as item then { item.answer first as answer where item.linkId = 'pha' -> certificate.issuer as issuer then { answer.valueString as content -> issuer.identifier as identifier then { content as value -> identifier.value = value "set issuer identifier"; } "set issuer"; } "first answser for hcid"; item.answer first as answer where item.linkId = 'hcid' -> certificate.hcid as hcid then { answer.valueString as content -> hcid.value = content, certificate.version = 'RC2' "set hcid and version"; } "first answser for hcid"; } "certificate items"; qr as src -> certificate.period as period then QRespToPeriod(src, period) "set vaccination period"; }
{
"resourceType" : "StructureMap",
"id" : "QRespToVSCoreDataSet",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap QRespToVSCoreDataSet</b></p><a name=\"QRespToVSCoreDataSet\"> </a><a name=\"hcQRespToVSCoreDataSet\"> </a><a name=\"QRespToVSCoreDataSet-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> "</span>http://smart.who.int/ddcc/StructureMap/QRespToVSCoreDataSet<span style=\"color: navy\">" = "</span>QRespToVSCoreDataSet<span style=\"color: navy\">"\r\n\r\n</span><b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\" title=\"QuestionnaireResponse\">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style=\"color: navy\">" </span><b>alias </b>QResp <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-DDCCCoreDataSetVSCoC.html\" title=\"DDCC Core Data Set Logical Model - Vaccination Status - Continuity of Care\">http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSCoC</a><span style=\"color: navy\">" </span><b>alias </b>DDCC <b>as </b><b>target</b>\r\n\r\n<b>group </b>QRespToCoreDataSet<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QResp, <b>target</b> <span style=\"color: maroon\">ddcc</span><span style=\"color: navy\"> : </span>DDCC<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr<b> as </b><span style=\"color: maroon\">src</span><b> then </b>QRespToHeader<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ddcc</span><span style=\"color: navy\">)</span> <i>"set header content"</i><span style=\"color: navy\">;</span>\r\n qr<b> as </b><span style=\"color: maroon\">src</span><span style=\"color: navy\"><b> -> </b></span>ddcc.vaccination<b> as </b><span style=\"color: maroon\">vaccination</span><b> then </b>QRespToVaccination<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">)</span> <i>"set vaccination content"</i><span style=\"color: navy\">;</span>\r\n qr<b> as </b><span style=\"color: maroon\">src</span><span style=\"color: navy\"><b> -> </b></span>ddcc.certificate<b> as </b><span style=\"color: maroon\">certificate</span><b> then </b>QRespToCertificate<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span> <i>"set certificate content"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>QRespToHeader<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span>, <b>target</b> <span style=\"color: maroon\">ddcc</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span> item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'name'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>ddcc.name = <span style=\"color: maroon\">content</span> <i>"set name"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for name"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'birthDate'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>ddcc.birthDate = <span style=\"color: maroon\">content</span> <i>"set birthDate"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for birthDate"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'identifier'<span style=\"color: navy\"><b> -> </b></span>ddcc.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">content</span> <i>"set identifier"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for identifier"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'sex'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> coding.code<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>ddcc.sex = <span style=\"color: maroon\">content</span> <i>"set sex"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"process coding"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for sex"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"header items"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>QRespToVaccination<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span>, <b>target</b> <span style=\"color: maroon\">vaccination</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span> item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'vaccine'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.vaccine = <span style=\"color: maroon\">content</span> <i>"set vaccine"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for vaccine"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'brand'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.brand = <span style=\"color: maroon\">content</span> <i>"set brand"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for brand"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'manufacturer'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.manufacturer = <span style=\"color: maroon\">content</span> <i>"set manufacturer"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for manufacturer"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'ma_holder'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.maholder = <span style=\"color: maroon\">content</span> <i>"set maholder"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for maholder"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'lot'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.lot = <span style=\"color: maroon\">content</span> <i>"set lot"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for lot"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'date'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.date = <span style=\"color: maroon\">content</span> <i>"set date"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for date"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'vaccine_valid'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.validFrom = <span style=\"color: maroon\">content</span> <i>"set validFrom"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for validFrom"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'dose'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueInteger<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.dose = <span style=\"color: maroon\">content</span> <i>"set dose"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for dose"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'total_doses'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueInteger<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.totalDoses = <span style=\"color: maroon\">content</span> <i>"set totalDoses"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for totalDoses"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'country'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.country = <span style=\"color: maroon\">content</span> <i>"set country"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for country"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'centre'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.centre = <span style=\"color: maroon\">content</span> <i>"set centre"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for centre"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'hw'<span style=\"color: navy\"><b> -> </b></span>vaccination.practitioner<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">content</span> <i>"set practitioner"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for practitioner"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'disease'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueCoding<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.disease = <span style=\"color: maroon\">content</span> <i>"set disease"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for disease"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'due_date'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>vaccination.nextDose = <span style=\"color: maroon\">content</span> <i>"set nextDose"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for nextDose"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"vaccination items"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>QRespToPeriod<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span>, <b>target</b> <span style=\"color: maroon\">period</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span> item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'valid_from'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>period.start = <span style=\"color: maroon\">content</span> <i>"set valid_from"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for valid_from"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'valid_until'<b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueDate<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>period.end = <span style=\"color: maroon\">content</span> <i>"set valid_until"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answer for valid_until"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"vaccination validity items"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>QRespToCertificate<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span>, <b>target</b> <span style=\"color: maroon\">certificate</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span> item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'pha'<span style=\"color: navy\"><b> -> </b></span>certificate.issuer<b> as </b><span style=\"color: maroon\">issuer</span><b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>issuer.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {\r\n</span> content<b> as </b><span style=\"color: maroon\">value</span><span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">value</span> <i>"set issuer identifier"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"set issuer"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for hcid"</i><span style=\"color: navy\">;</span>\r\n item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'hcid'<span style=\"color: navy\"><b> -> </b></span>certificate.hcid<b> as </b><span style=\"color: maroon\">hcid</span><b> then</b><span style=\"color: navy\"> {\r\n</span> answer.valueString<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> hcid.value = <span style=\"color: maroon\">content</span><span style=\"color: navy\">, </span> certificate.version = <span style=\"color: blue\">'RC2'</span> <i>"set hcid and version"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"first answser for hcid"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"certificate items"</i><span style=\"color: navy\">;</span>\r\n qr<b> as </b><span style=\"color: maroon\">src</span><span style=\"color: navy\"><b> -> </b></span>certificate.period<b> as </b><span style=\"color: maroon\">period</span><b> then </b>QRespToPeriod<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">period</span><span style=\"color: navy\">)</span> <i>"set vaccination period"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
},
"url" : "http://smart.who.int/ddcc/StructureMap/QRespToVSCoreDataSet",
"version" : "1.0.0",
"name" : "QRespToVSCoreDataSet",
"status" : "draft",
"date" : "2024-10-17T05:03:04+00:00",
"publisher" : "WHO",
"contact" : [
{
"name" : "WHO",
"telecom" : [
{
"system" : "url",
"value" : "http://who.int"
}
]
}
],
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse",
"mode" : "source",
"alias" : "QResp"
},
{
"url" : "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVSCoC",
"mode" : "target",
"alias" : "DDCC"
}
],
"group" : [
{
"name" : "QRespToCoreDataSet",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"type" : "QResp",
"mode" : "source"
},
{
"name" : "ddcc",
"type" : "DDCC",
"mode" : "target"
}
],
"rule" : [
{
"name" : "set header content",
"source" : [
{
"context" : "qr",
"variable" : "src"
}
],
"dependent" : [
{
"name" : "QRespToHeader",
"variable" : [
"src",
"ddcc"
]
}
]
},
{
"name" : "set vaccination content",
"source" : [
{
"context" : "qr",
"variable" : "src"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "vaccination",
"variable" : "vaccination"
}
],
"dependent" : [
{
"name" : "QRespToVaccination",
"variable" : [
"src",
"vaccination"
]
}
]
},
{
"name" : "set certificate content",
"source" : [
{
"context" : "qr",
"variable" : "src"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "certificate",
"variable" : "certificate"
}
],
"dependent" : [
{
"name" : "QRespToCertificate",
"variable" : [
"src",
"certificate"
]
}
]
}
]
},
{
"name" : "QRespToHeader",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"mode" : "source"
},
{
"name" : "ddcc",
"mode" : "target"
}
],
"rule" : [
{
"name" : "header items",
"source" : [
{
"context" : "qr",
"element" : "item",
"variable" : "item"
}
],
"rule" : [
{
"name" : "first answser for name",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'name'"
}
],
"rule" : [
{
"name" : "set name",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "name",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for birthDate",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'birthDate'"
}
],
"rule" : [
{
"name" : "set birthDate",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for identifier",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'identifier'"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "set identifier",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for sex",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'sex'"
}
],
"rule" : [
{
"name" : "process coding",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "set sex",
"source" : [
{
"context" : "coding",
"element" : "code",
"variable" : "content"
}
],
"target" : [
{
"context" : "ddcc",
"contextType" : "variable",
"element" : "sex",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "QRespToVaccination",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"mode" : "source"
},
{
"name" : "vaccination",
"mode" : "target"
}
],
"rule" : [
{
"name" : "vaccination items",
"source" : [
{
"context" : "qr",
"element" : "item",
"variable" : "item"
}
],
"rule" : [
{
"name" : "first answer for vaccine",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'vaccine'"
}
],
"rule" : [
{
"name" : "set vaccine",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "vaccine",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for brand",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'brand'"
}
],
"rule" : [
{
"name" : "set brand",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "brand",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for manufacturer",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'manufacturer'"
}
],
"rule" : [
{
"name" : "set manufacturer",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "manufacturer",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for maholder",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'ma_holder'"
}
],
"rule" : [
{
"name" : "set maholder",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "maholder",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answser for lot",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'lot'"
}
],
"rule" : [
{
"name" : "set lot",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "lot",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for date",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'date'"
}
],
"rule" : [
{
"name" : "set date",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "date",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for validFrom",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'vaccine_valid'"
}
],
"rule" : [
{
"name" : "set validFrom",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "validFrom",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for dose",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'dose'"
}
],
"rule" : [
{
"name" : "set dose",
"source" : [
{
"context" : "answer",
"element" : "valueInteger",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "dose",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for totalDoses",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'total_doses'"
}
],
"rule" : [
{
"name" : "set totalDoses",
"source" : [
{
"context" : "answer",
"element" : "valueInteger",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "totalDoses",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for country",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'country'"
}
],
"rule" : [
{
"name" : "set country",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "country",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answser for centre",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'centre'"
}
],
"rule" : [
{
"name" : "set centre",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "centre",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answser for practitioner",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'hw'"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "practitioner",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "set practitioner",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for disease",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'disease'"
}
],
"rule" : [
{
"name" : "set disease",
"source" : [
{
"context" : "answer",
"element" : "valueCoding",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "disease",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for nextDose",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'due_date'"
}
],
"rule" : [
{
"name" : "set nextDose",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "vaccination",
"contextType" : "variable",
"element" : "nextDose",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "QRespToPeriod",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"mode" : "source"
},
{
"name" : "period",
"mode" : "target"
}
],
"rule" : [
{
"name" : "vaccination validity items",
"source" : [
{
"context" : "qr",
"element" : "item",
"variable" : "item"
}
],
"rule" : [
{
"name" : "first answer for valid_from",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'valid_from'"
}
],
"rule" : [
{
"name" : "set valid_from",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "period",
"contextType" : "variable",
"element" : "start",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
},
{
"name" : "first answer for valid_until",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'valid_until'"
}
],
"rule" : [
{
"name" : "set valid_until",
"source" : [
{
"context" : "answer",
"element" : "valueDate",
"variable" : "content"
}
],
"target" : [
{
"context" : "period",
"contextType" : "variable",
"element" : "end",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "QRespToCertificate",
"typeMode" : "none",
"input" : [
{
"name" : "qr",
"mode" : "source"
},
{
"name" : "certificate",
"mode" : "target"
}
],
"rule" : [
{
"name" : "certificate items",
"source" : [
{
"context" : "qr",
"element" : "item",
"variable" : "item"
}
],
"rule" : [
{
"name" : "first answser for hcid",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'pha'"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "issuer",
"variable" : "issuer"
}
],
"rule" : [
{
"name" : "set issuer",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "issuer",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "set issuer identifier",
"source" : [
{
"context" : "content",
"variable" : "value"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "value"
}
]
}
]
}
]
}
]
},
{
"name" : "first answser for hcid",
"source" : [
{
"context" : "item",
"element" : "answer",
"listMode" : "first",
"variable" : "answer",
"condition" : "item.linkId = 'hcid'"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "hcid",
"variable" : "hcid"
}
],
"rule" : [
{
"name" : "set hcid and version",
"source" : [
{
"context" : "answer",
"element" : "valueString",
"variable" : "content"
}
],
"target" : [
{
"context" : "hcid",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
},
{
"context" : "certificate",
"contextType" : "variable",
"element" : "version",
"transform" : "copy",
"parameter" : [
{
"valueString" : "RC2"
}
]
}
]
}
]
}
]
},
{
"name" : "set vaccination period",
"source" : [
{
"context" : "qr",
"variable" : "src"
}
],
"target" : [
{
"context" : "certificate",
"contextType" : "variable",
"element" : "period",
"variable" : "period"
}
],
"dependent" : [
{
"name" : "QRespToPeriod",
"variable" : [
"src",
"period"
]
}
]
}
]
}
]
}
XIG built as of ??metadata-date??. Found ??metadata-resources?? resources in ??metadata-packages?? packages.